import { h } from 'vue';
import { NImage } from 'naive-ui';
import { BasicColumn } from '@/components/Table';

export const columns: BasicColumn[] = [
  {
    title: '序号',
    key: 'id',
    align: "center",
  }, {
    title: '标题',
    key: 'title',
    align: "center",
  }, {
    title: '描述',
    key: 'description',
    align: "center",
  }, 
  // {
  //   title: '所属分类',
  //   key: 'category_name',
  //   align: "center",
  // },
  {
    title: '主图',
    key: 'image',
    align: "center",
    render(row) {
      return h(
        NImage,
        {
          width: 50,
          height: 50,
          src: row.image
        },
      );
    },
  }, {
    title: '创建时间',
    key: 'create_time',
    align: "center",
  },
];
